home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / TEECHART / Delphi1_And_Delphi2 / EXAMPLES / 3RDPARTY / Ace Reporter / README.TXT
Encoding:
Text File  |  1998-10-24  |  1.1 KB  |  59 lines

  1.  
  2. ACE Reporter
  3. =============
  4.  
  5. TeeChart-Pro integration with ACE Reporter is 
  6. possible by sending the Chart component as a
  7. bitmap or metafile to an ACE report component.
  8.  
  9. The ACE Reporter makers provide an integration
  10. component to use TeeChart under ACE reports.
  11.  
  12. You can reach the ACE Reporter developers
  13. at this address:
  14.  
  15. http://www.sct-associates.com
  16.  
  17. SCT Associates, Inc.
  18. 9221 S. Kilpatrick Ave.
  19. Oak Lawn, IL 60453-1813
  20. USA
  21.  
  22. Email:
  23.  
  24. info@sct-associates.com
  25. support@sct-associates.com
  26.  
  27. ----------------------------------------------
  28.  
  29. Source code snippet:
  30.  
  31. 1) Add an ACE expression variable of type bitmap:
  32.  
  33.     ChartBitmap: TSctExprvar;
  34.  
  35. 2) Implement the variable GetData event:
  36.  
  37. procedure TChartForm.ChartBitmapGetData(oVar: TSctvar);
  38. var
  39.   Stream: TStream;
  40. begin
  41.   with TBitmap.Create do
  42.   try
  43.     Width := Chart1.Width;
  44.     Height := Chart1.Height;
  45.     Chart1.Draw(Canvas, Rect(0,0,Width, Height));
  46.     Stream := TMemoryStream.Create;
  47.     try
  48.       SaveToStream(Stream);
  49.       oVar.AsStream := Stream;
  50.     finally
  51.       Stream.Free;
  52.     end;
  53.   finally
  54.     free;
  55.   end;
  56. end;
  57.  
  58.  
  59.